from connecttodatabase.connect_to_database import E_FilmInfor
from sqlalchemy import desc
from flask import jsonify

class SCtr_Film_M:
    @staticmethod
    def get_film_info():
        return E_FilmInfor.get_film_info()
    
    @staticmethod
    def get_more_films(film_type,last_film_id):
        return E_FilmInfor.get_more_films(film_type,last_film_id)
    
    @staticmethod
    def search_film(search):
        return E_FilmInfor.search_films(search)
    
    @staticmethod
    def get_film_by_id(film_id):
        return E_FilmInfor.get_film_by_id(film_id)
    
    @staticmethod
    def add_film(film_name, actor, director, release_time, introductory,www_http):
        return E_FilmInfor.add_film(film_name, actor, director, release_time, introductory,www_http)
    
    @staticmethod
    def delete_film(film_id):
        return E_FilmInfor.delete_film(film_id)
    
    @staticmethod
    def update_film(film_id,content):
        return E_FilmInfor.update_film(film_id,**content)